import React, { Component } from 'react'
import styles from './index.less'
import RightContent from './RightContent.js'

import {
    Icon
} from 'antd';

export default class Header extends Component {
    render() {
        const {onCollapse, collapsed} = this.props
        return (
            <div className = {styles.headerView}> 
                <span className = {styles.menuBtn} onClick = { 
                    //点击修改菜单展开状态
                        ()=>{
                            onCollapse(!collapsed)
                        } 
                    }>
                    <Icon type={collapsed ? "menu-unfold" : "menu-fold"} />
                </span>
                <RightContent/>
            </div>
        )
    }
}
